home *** CD-ROM | disk | FTP | other *** search
- regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %daycolor_a )
- regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
- pshader("
-
- ;#include <consts.psh>
- ps_1_4
-
- ;def c5, DAYCOLOR
- ;def c7, AMBIENT
-
- texld r0, t0 ;RGB=terrain colormap, A=terrain lightmap
- texld r1, t1 ;terrain detail
- texld r2, t2 ;road detail
- texld r3, t3 ;detailmasks
- texld r4, t4 ;clouds
- texld r5, t5 ;water deep
-
- lrp r1.rgb, r3.b, r2, r1 ;terrain detail blend road detail with detailmasks = blended details
- +mul r0.a, 1-r4.a, r0.a ; clouds shadow * terrain lightmap = static lighting
-
- mul r0.rgb, r0, r1 ;terrain color * blended details = terrain
- +mad_sat r0.a, r0.a, c7.b, c7.a ;ambient + static lighting = static lighting
-
- mul r4, r0.a, c5 ;day
-
- mul r0.rgb, r0, r4 ;light color
- +mov r0.a, r5.a
-
- ")
-
-